package User;
import Book.*;
import IOperator.*;
import java.sql.SQLException;

public abstract class User {
    protected String name;

    protected IOperator[] ioperators; //操作数组

    public User(String name) {
        this.name = name;
    }
    public abstract int menu();//菜单

    public void doIOperator(int choice, Bookshelf bookshelf) throws SQLException {
        ioperators[choice].work(bookshelf);//对书架进行操作
    }
}
